Hi , i found my skin checker mod and thought i would update/finish it and upload here for anyone who needs one
What it does it scan through a list of 'allowed' skins ( atm it includes just all stock ones ) and if a players skin is not on the list, changes their model to a random allowed one.
The force of the model is only current until they respawn , or change to a allowed skin. The reason being is i didnt want to change the players settings on them, noone likes that. So instead i made it so just while their in your server, there model will be changed.
Settings, are changed at the top of the script,
[Required] Scantime , time between scans, default is 10 seconds, dont go lower then 5.
[Optional] Turn forcemodels OFF on each player
[Optional] Send a message to the player when they had their skin changed
To ADD/REMOVE skins to the list of allowed ones, just add them to each array.
Save as whatever you want and exec from dmprecache.scr
Code:/// Purple Elephants stock skin checker /// Date : 9/12/2013 [AUS] so 12/9/2013 for those other people main: level waittill spawn if(level.skinrun) end level.skinrun = 1 ///////////// Settings are here /////////////////// ///[Required] Time between scans ; in seconds , default is 10 , DONT GO LOWER THEN 5!!! level.scantime = int(10) //[Optional] Whether to warn players every time if model is not allowed << can get annoying if it messages every time they respawn. level.skin_warning = 0 level.skin_message = "Your skin has been changed by the server to a stock one." ///[Optional] Turn forcemodels off for the player level.forcemodeloff = 1 ///////////// ^^^^^^^^^^^^^ /////////////////// waitthread get_skins thread scan_players end get_skins: ///////---------------------Change allowed skins here----------------- //////////////////////////// //// ---Allowed ALLIES skins --- //// level.allowed_allies = makeArray /// Stock skins //// "models/player/allied_airborne.tik" "models/player/allied_manon.tik" "models/player/allied_pilot.tik" "models/player/allied_sas.tik" "models/player/american_army.tik" "models/player/american_ranger.tik" //// Place new skins below //// Place new skins above here endArray ///// --- Allowed AXIS Skins---- /// level.allowed_axis = makeArray /// Stock skins //// "models/player/german_afrika_officer.tik" "models/player/german_afrika_private.tik" "models/player/german_elite_officer.tik" "models/player/german_elite_sentry.tik" "models/player/german_kradshutzen.tik" "models/player/german_panzer_grenadier.tik" "models/player/german_panzer_obershutze.tik" "models/player/german_panzer_shutze.tik" "models/player/german_panzer_tankcommander.tik" "models/player/german_scientist.tik" "models/player/german_waffenss_officer.tik" "models/player/german_waffenss_shutze.tik" "models/player/german_wehrmacht_officer.tik" "models/player/german_wehrmacht_soldier.tik" "models/player/german_winter_1.tik" "models/player/german_winter_2.tik" "models/player/german_worker.tik" "models/player/german_waffen_officer.tik" "models/player/german_waffen_shutze.tik" //// Place new skins below //// Place new skins above here endArray end ////////////////////////////////////////////// scan_players: while(1) { waitthread get_skins for(local.i = 1; local.i <= $player.size; local.i++) { local.player= $player[local.i] waitframe if(local.player != NULL && local.player.dmteam != "spectator" && isAlive(local.player)) { wait 2 //Forcemodel if(level.forcemodeloff == 1) local.player stufftext "cg_forcemodel 0" ////////////////////////////////////////////////////////////// //Checks player model against list of stock and/or allowed skins/// if(local.player.dmteam == "allies") { local.player.allowed_skin = 0 for(local.i=1;local.i<=level.allowed_allies.size;local.i++) { local.allowed_skin = "" local.allowed_skin = level.allowed_allies[local.i][1] /// Check to see if its on the list, if it is , sets allowed to 1 if(local.player.model == local.allowed_skin) local.player.allowed_skin = 1 waitframe } /// if not allowed ie 0 if(local.player.allowed_skin != 1) thread change_skin local.player } else { local.player.allowed_skin = 0 for(local.i=1;local.i<=level.allowed_axis.size;local.i++) { local.allowed_skin = "" local.allowed_skin = level.allowed_axis[local.i][1] /// Check to see if its on the list, if it is , sets allowed to 1 if(local.player.model == local.allowed_skin) local.player.allowed_skin = 1 waitframe } /// if not allowed ie 0 if(local.player.allowed_skin != 1) thread change_skin local.player } ////////////////////////////////////// } } wait level.scantime } end change_skin local.player: //Warn Player of their Skin if(level.skin_warning == 1) local.player iprint level.skin_message /// now gives them a random model from the allowed list if(local.player.dmteam == "allies") { local.ran = randomint(level.allowed_allies.size) local.new_model = level.allowed_allies[local.ran + 1][1] } else { local.ran = randomint(level.allowed_axis.size) local.new_model = level.allowed_axis[local.ran + 1][1] } waitframe local.player.model = local.new_model local.player resetstate end



Reply With Quote

of course I had to do it 3 times before my old brain figured it out.
